import http from '@/utils/request'

// 获取商品分类
export const getCategories = () => http.get('/cate/category')

// 根据id获取商品
export const getProduct = (active: number) => http.get('/cate/product/' + active)

// 获取详情
export const getProductDetail = (id: string) => http.get('/cate/detail/' + id)

// // 搜索商品.
// export const getSearchSku = (o: SkuProductPageSearchParams) =>
//   http.get<SkuProductPage>(`/search/sku/${o.page}/${o.limit}?${objToQuery(o)}`);

// // description  商品详情.
// export const getHomeItem = (skuId: number) =>
//   http.get<SkuInfo>(`/home/item/${skuId}`);

// //  领取优惠券
// export const receiveCoupon = (couponId: number) =>
//   http.get<null>(`/activity/auth/getCouponInfo/${couponId}`);
